<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增重要事项')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<style>
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-importantMatter-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">工程公司：</label>
            <div class="col-sm-8">
                <select name="compName" class="form-control">
                    <option value="">请选择</option>
                    <option th:each="comp : ${comp}" th:text="${comp.compName}"
                            th:value="${comp.compName}" th:title="${comp.compId}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">项目名称：</label>
            <div class="col-sm-8">
                <select name="proName" class="form-control">
                    <option value="">请选择</option>
                    <option th:each="pro : ${pro}" th:text="${pro.proName}"
                            th:value="${pro.proName}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">重点事项：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="matter" placeholder="请输入重点事项">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">责任人：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="dutyBy" placeholder="请输入责任人">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">要求完成时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="planTime" name="planTime" placeholder="请输入要求完成时间">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">督办情况：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="superviseDynamic" placeholder="请输入督办动态">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">更新时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="realityTime" name="realityTime" placeholder="请输入更新时间">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">事项来源：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="matterSource" placeholder="请输入事项来源">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script>
    var prefix = ctx + "importantMatter";

    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '#planTime'
            });

            laydate.render({
                elem: '#realityTime'
            });
        });
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-importantMatter-add").serializeArray();
            $.operate.save(prefix + "/add", data);
        }
    }

</script>
</body>
</html>